
package results;

import objects.MobileStation;
import objects.Station;

/**
 * Monitors the reachLength of a station
 * 
 * @author Guillaume
 * @created June 8, 2004
 */

public class ProbeComCurrentFrequency extends ProbeCom {

    /** Property name monitored by the probe */
    private static final String PROPERTY_NAME = "ProbeComCurrentFrequency";

    /** Probe description */
    private static final String PROBE_DESCRIPTION = "";
	

    /**
     * @param t
     * @param ProbeName probe name
     */
    public ProbeComCurrentFrequency(Station t, String probeName) {
	super(DEPL_LOOP,t ,probeName);
    }

    /** 
     * Get the carrier rate of the monitored station
     * @see Results.Probe#getValue()
     */
    protected Object getValue() {
	    try{
	Station m = (Station) _linkedStation;
	return new Float(m.getccEmiting().getWishedEmission().getFrequency());
	    }catch(Exception e){
		    return new Float(0);
	    }
    }

    /**
     * Get the property Name
     * @return property name
     * @see Results.Probe#getPropertyName()
     */
    public String getPropertyName() {
	return PROPERTY_NAME;
    }

    /**
     * Get the descitption of the probe
     * @return probe description
     * @see Results.Probe#getProbeDescription()
     */
    public String getProbeDescription() {
	return PROBE_DESCRIPTION;
    }

    public static void main(String[] args) {
    }
}
